package org.jrazdacha.bittorrent.modelling;

import org.jrazdacha.bittorrent.modelling.core.Id;

public class StringId extends Id {
	
	private String id;

	public StringId(String id) {
		this.id = id;
	}
	
	@Override
	public Object getValue() { 
		return id;
	}
	
	@Override
	public int hashCode() {		
		return id.hashCode();
	}	
	
	@Override
	protected boolean customEquals(Object otherObj) {
		StringId otherId = (StringId)otherObj;
		
		return id.equals(otherId.id);
	}

	@Override
	public String toString() {
		return id.toString();
	}
}
